package ooday05;



public class StaticMethod {
    int a;
    static int b;
    void show(){
        System.out.println(a);//this.a
        System.out.println(b);//StaticMethod.b
    }
    static void test(){
       // System.out.println(a);//编译错误，静态方法中不能直接访问实例变量
        System.out.println(b);
    }
    //在say()中需要访问对象的属性a
    void say(){
        System.out.println(a);
    }
    int plus(int num1,int num2){
        int num=num1+num2;
        return num;
    }

}
